package com.etc.service.impl;

import com.etc.dao.AdminDao;
import com.etc.dao.impl.AdminDaoImpl;
import com.etc.entity.Admin;
import com.etc.service.AdminLoginService;

public class AdminLoginServiceImpl implements AdminLoginService{
	
	private AdminDao adminDao = new AdminDaoImpl();

	@Override
	public Admin login(String mobile, String password) {
			Admin admin = adminDao.findByMobileAndPassword(mobile, password);
			return admin;
	}

	@Override
	public boolean updateAdminInfo(Admin admin) {
		int n =adminDao.updateById(admin);
		if (n>0) {
			return true;
		}
		return false;
	}
}
